package com.fox.stock.service;

import com.fox.stock.pojo.domain.PermissionDomain;
import com.fox.stock.pojo.domain.SysUserInfoDomain;
import com.fox.stock.pojo.entity.SysPermission;
import com.fox.stock.pojo.entity.SysRole;
import com.fox.stock.pojo.entity.SysUser;
import com.fox.stock.pojo.vo.req.LoginReqVo;
import com.fox.stock.pojo.vo.req.UserSearchByConditionReqVo;
import com.fox.stock.pojo.vo.resq.LoginRespVo;
import com.fox.stock.pojo.vo.resq.PageResult;
import com.fox.stock.pojo.vo.resq.R;

import java.util.List;
import java.util.Map;

public interface UserService {
    SysUser selectByUsernameToSysUser(String username);

    R<LoginRespVo> login(LoginReqVo loginReqVo);

    R<Map> getCaptchaCode();

    R<PageResult> findUserInfoByCondition(UserSearchByConditionReqVo userSearchByConditionReqVo);

    R addUserInfo(SysUser sysUser);

    R<Map<String, Object>> getRolesInfo(String userId);

    R upDateUsereRolesInfo(Map<String, Object> date);

    R deleteUserInfoByUserId(List<Long> list);

    R<SysUser> findUserInfoById(String id);

    R upDateUserInfoById(SysUserInfoDomain sysUser);

    R<PageResult<SysRole>> selectRoleInfoByPage(Map<String, Object> map);

    R<List<PermissionDomain>> getAllPermissionTree();

    R addRoleAndPermission(Map<String, Object> map);

    R<List<String>> getPermissionByroleId(String roleId);

    R upDateRoleAndPermission(Map<String, Object> map);

    R deleteRoleAndPermissionByRoleId(String roleId);

    R updateRoleStatus(Long roleId, Integer status);

    R<List<SysPermission>> getAllPermissionInfo();

    R<List<Map<String, Object>>> getAllPermissionTreeIgnore3();

    R addPermission(SysPermission sysPermission);

    R deletePermissionById(Long permissionId);

    R upDatePermission(SysPermission sysPermission);
}
